import java.util.Scanner;

public class Main1019 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int s=1;int x=0;
            for (int i=1;i<=n;i++){
                s=s*i;
                x=x+s;
        }
        System.out.println(x);
    }
}
